home *** CD-ROM | disk | FTP | other *** search
/ Hot Metal Pro 4.0 / Hot Metal Pro 4.0.iso / HMPTools / VRCreate / data.z / Click - Flip 180 Degrees.beh < prev    next >
Encoding:
Text File  |  1997-06-05  |  632 b   |  36 lines

  1. #VRML V2.0 utf8 - PLATINUM technology, inc. 1997
  2. #ADD_TOUCH_SENSOR
  3.  
  4. # Flip 180 degrees
  5.  
  6. DEF $OBJECT_Flip_180_degrees Script {
  7.     eventIn        SFTime        click
  8.     eventOut    SFRotation    newRotation
  9.     field        SFRotation    calcRotation 0 1 0 0
  10.     field        SFInt32        counter        0
  11.  
  12.     url"javascript:
  13.         function click(value,ts)
  14.         {
  15.         
  16.             counter=counter+1;
  17.             if (counter==2)
  18.                 {counter=0;}
  19.              calcRotation[3]=3.14*counter;
  20.             newRotation=calcRotation;
  21.         }
  22.     
  23.     "
  24. }
  25. # Animation path
  26.  
  27.  
  28. #route map
  29.  
  30. ROUTE $OBJECT_Flip_180_degrees.newRotation TO $OBJECT.set_rotation
  31. ROUTE $OBJECTTS.touchTime TO $OBJECT_Flip_180_degrees.click
  32.  
  33.  
  34.  
  35.  
  36.